Skip to content

Conversation

breskeby
Copy link
Contributor

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core
@breskeby breskeby added >non-issue :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team auto-backport Automatically create backport pull requests when merged v9.2.0 v8.19.5 v9.1.5 v8.18.8 v9.0.8 labels Sep 29, 2025
@breskeby breskeby self-assigned this Sep 29, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@breskeby breskeby merged commit 10f8536 into elastic:main Sep 29, 2025
34 checks passed
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 29, 2025
…elastic#135598)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 29, 2025
…elastic#135598)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.19
9.1
8.18 Commit could not be cherrypicked due to conflicts
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 135598

elasticsearchmachine pushed a commit that referenced this pull request Sep 29, 2025
…#135598) (#135647)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies
elasticsearchmachine pushed a commit that referenced this pull request Sep 29, 2025
…#135598) (#135646)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 30, 2025
…elastic#135598)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies

(cherry picked from commit 10f8536)

# Conflicts:
#	test/framework/build.gradle
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Sep 30, 2025
…elastic#135598)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies

(cherry picked from commit 10f8536)

# Conflicts:
#	test/framework/build.gradle
@breskeby
Copy link
Contributor Author

💔 Some backports could not be created

Status Branch Result
9.0
8.18 Could not create pull request: fetch failed

Manual backport

To create the backport manually run:

backport --pr 135598

Questions ?

Please refer to the Backport tool documentation

breskeby added a commit that referenced this pull request Sep 30, 2025
…#135598) (#135669)

* [Example Builds] Fix Jarhell in example build due to version conflict

In test framework we expose org.hamcrest:hamcrest. Transitively junit and the randomized runner
expose hamcrest-core transitive dependencies. This makes jarHell task fail as those jars share
common class files.

We exclude hamcrest core now explicitly as transitive dependency in the generated pom for
test framework as we already include a superset of this by having a direct dependency on
hamcrest which includes hamcrest-core

* Cleanup

* Rework excluded transitive dependencies

(cherry picked from commit 10f8536)

# Conflicts:
#	test/framework/build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged backport pending :Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v8.18.8 v8.19.5 v9.0.8 v9.1.5 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants